class CreateIndex < ActiveRecord::Migration
  def up
    
    add_index :avattributes, :avtype
    add_index :avattributes, :schedule_event_id
    
    add_index :episode_ofs, :program_information_id
    add_index :episode_ofs, :index
    add_index :episode_ofs, :crid
    
    add_index :group_information_tables, :select_file_id
    
    add_index :group_informations, :groupId
    add_index :group_informations, :group_type
    add_index :group_informations, :memberOfId
    add_index :group_informations, :group_information_table_id
    
    add_index :member_ofs, :program_information_id
    add_index :member_ofs, :index
    add_index :member_ofs, :crid
    
    add_index :program_information_tables, :select_file_id
    
    add_index :program_informations, :id
    add_index :program_informations,:crid
    add_index :program_informations,:language 
    add_index :program_informations,:program_information_table_id
    add_index :program_informations,:episodeOfId
    add_index :program_informations,:memberOfId
    
    add_index :program_location_tables, :select_file_id
     
    add_index :schedule_events, :schedule_id
    add_index :schedule_events, :programCrid
    add_index :schedule_events, :memberOfId
    add_index :schedule_events,  :episodeOdId 
    
    add_index :schedules, :service_id
    add_index :schedules, :program_location_table_id   
    
    add_index :service_information_tables, :select_file_id
    
    add_index :service_informations, :serviceId
    add_index :service_informations, :service_information_table_id
 
  end

  def down
    remove_index :avattributes, :avtype
    remove_index :avattributes, :schedule_event_id
    
    remove_index :episode_ofs, :program_information_id
    remove_index :episode_ofs, :index
    remove_index :episode_ofs, :crid
    
    remove_index :group_information_tables, :select_file_id
    
    remove_index :group_informations, :groupId
    remove_index :group_informations, :group_type
    remove_index :group_informations, :memberOfId
    remove_index :group_informations, :group_information_table_id
    
    remove_index :member_ofs, :program_information_id
    remove_index :member_ofs, :index
    remove_index :member_ofs, :crid
    
    remove_index :program_information_tables, :select_file_id
    
    remove_index :program_informations, :id
    remove_index :program_informations,:crid
    remove_index :program_informations,:language 
    remove_index :program_informations,:program_information_table_id
    remove_index :program_informations,:episodeOfId
    remove_index :program_informations,:memberOfId
    
    remove_index :program_location_tables, :select_file_id
     
    remove_index :schedule_events, :schedule_id
    remove_index :schedule_events, :programCrid
    remove_index :schedule_events, :memberOfId
    remove_index :schedule_events,  :episodeOdId 
    
    remove_index :schedules, :service_id
    remove_index :schedules, :program_location_table_id   
    
    remove_index :service_information_tables, :select_file_id
    
    remove_index :service_informations, :serviceId
    remove_index :service_informations, :service_information_table_id
 
  end
end
